var baseUrl = 'https://www.teda.gov.cn';

// 获取应急局主事项
function GetEmergencyMatterMaster(data,page) {
  var serverData = {};
  $.ajax({
    type: "post",
    contentType: "application/json;charset=UTF-8",
    // url: baseUrl + "/PolicyImplementation/Matter/getEmergencyMatterMaster",
     url: baseUrl + "/matter/Matter/GetMatterTree?pageIndex="+page.pageIndex+"&pageSize="+page.pageSize,
    async: false,
    data: data,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 查询应急局子事项
function GetEmergencyMatterInfo(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/Matter/getEmergencyMatterInfo?PM_ID="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 获取事项基本要素
function GetProceedingEssentials(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/MatterGuide/GetProceedingEssentials?pr_id="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 获取事项受理条件
function GetProceedingAcceptCondition(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/MatterGuide/GetProceedingAcceptCondition?pr_id="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 获取事项办理材料
function GetProceedingAttach(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/MatterGuide/GetProceedingAttach?pr_id="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 获取事项办理流程
function GetProceedingProcess(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/MatterGuide/GetProceedingProcess?pr_id="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 获取事项收费情况
function GetProceedingCharge(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/MatterGuide/GetProceedingCharge?pr_id="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}

// 获取事项法定依据
function GetProceedingSetOnBase(data) {
  var serverData = {};
  $.ajax({
    type: "get",
    contentType: "application/x-www-form-urlencoded;charset=UTF-8",
    url: baseUrl + "/PolicyImplementation/MatterGuide/GetProceedingSetOnBase?pr_id="+data,
    async: false,
    dataType: 'json',
    success: function (res) {
      serverData = res;
    },
    error: function (e) {
      console.log('错误');
      console.log(e.status);
      console.log(e.responseText);
    }
  });
  return serverData;
}